#ifndef CARVIS_H
#define CARVIS_H

#include <time.h>
#include <QGraphicsItem>
#include <QObject>
#include <qthread.h>
#include "classes\Automat.hpp"

class Carvis : public QObject, public QGraphicsItem
{
	Q_OBJECT
public:
  Carvis(int Car_Id);
  QRectF boundingRect() const;
  QPainterPath shape() const;
  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
	void test();

protected:
  void advance(int step);
	void changed(const QList<QRectF> & region);
	 
private:
  int CarId;
  qreal angle;
  qreal speed;
  QColor color;
  QPoint position;

public slots:
	 void zrob_ruch(QPoint currentpos, int Car_Id);

 };

 #endif